import request from '@/utils/request'

/**
 * 查询App弹窗信息列表
 * @param {*} query 
 * @returns 
 */
export function listActivity(query) {
  return request({
    url: '/system/activity/list',
    method: 'get',
    params: query
  })
}
/**
 * 查询App弹窗信息详细
 * @param {*} id 
 * @returns 
 */
export function getActivity(id) {
  return request({
    url: '/system/activity/' + id,
    method: 'get'
  })
}

/**
 * 新增App弹窗信息
 * @param {*} data 
 * @returns 
 */
export function addActivity(data) {
  return request({
    url: '/system/activity',
    method: 'post',
    data: data
  })
}

/**
 * 修改App弹窗信息
 * @param {*} data 
 * @returns 
 */
export function updateActivity(data) {
  return request({
    url: '/system/activity',
    method: 'put',
    data: data
  })
}

/**
 * 删除App弹窗信息
 * @param {*} id 
 * @returns 
 */
export function delActivity(id) {
  return request({
    url: '/system/activity/' + id,
    method: 'delete'
  })
}

/**
 * 修改App上架、下架状态
 * @param {*} data 
 * @returns 
 */
export function updateActivityStatus(data) {
  return request({
    url: '/system/activity/status',
    method: 'post',
    data: data
  })
}
